local ToolBase = class("ToolBase", function()
	return display.newLayer()
end)

function ToolBase:ctor(data)
    self.data = data

    self.vCustomListeners = { }     --监听事件表

    self:enableNodeEvents()
end

function ToolBase:close()
	self:runAction(cca.seq({cca.delay(0.1),cca.removeSelf()}))
end

function ToolBase:initUI()
end

function ToolBase:AddDispatchEvent(name, func)       --添加消息监听，消息名称，触发回调
	local customListener = require("app.event.EventDispatcher"):GetInstance():AddEventListener(name, func)
    table.insert(self.vCustomListeners, customListener)
    --td.dispatchEvent(_eName, _data)   --发送消息方法
end




return ToolBase